package suncertify.resources;

import java.awt.Image;
import java.awt.Toolkit;
import java.io.File;
import java.util.ArrayList;
import java.util.List;

import suncertify.ui.Subscriber;

/**
 * A helper class to store all the commonly used Strings and properties 
 * While the application runs.
 * @author Paul Wilhelm
 *
 */
public class App {
	/**
	 * Whether the app is in networked mode or not
	 */
	public static boolean isNetworked = false;
	
	/**
	 * Whether the app is running in server mode or not
	 */
	public static boolean isServer = false;	
	
	/**
	 * Whether the app is running in alone mode or not
	 */
	public static boolean isAlone = false;			
	
	/**
	 * The host of the server
	 */
	public static String host;
	
	/**
	 * The port on which to run the server, or connect to a running server.
	 */
	public static int port;		
	
	/**
	 * The location of the DB file
	 */
	public static String dbLocation;
	
	/**
	 * The icon image for the app
	 */
	public static final Image icon = Toolkit.getDefaultToolkit().getImage(App.class.getClassLoader().getResource("suncertify/resources/icon.gif"));
	
	/**
	 * The location of the properties file
	 */
	public static final File propertiesFile= new File("suncertify.properties");
	
	/**
	 * A list of all local subscribers
	 */
	public static List<Subscriber> localList = new ArrayList<Subscriber>();	

}
